package com.chinackts.auth.controller;

import com.chinackts.auth.dto.AuthInitDto;
import com.chinackts.auth.dto.LoginParamsDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * @author Lianhong
 * @since 2021/10/25
 */
@Api(tags = "用户权限")
public interface AuthControllerInterface {

    /**
     * 采集服务初始化
     *
     * @return AuthInitDto
     */
    @ApiOperation("电子口岸初始化服务")
    @GetMapping("/init")
    ResponseEntity<AuthInitDto> init();


    /**
     * 单一窗口登录
     *
     * @return AuthInitDto
     */
    @ApiOperation("单一窗口登录")
    @PostMapping("/{id}/login")
    ResponseEntity<Void> login(@PathVariable String id, @Valid @RequestBody LoginParamsDto loginParamsDto);
}
